提示的五大支柱
超越简单的聊天界面,大型语言模型(LLMs)它们作为结构化数据处理的复杂引擎。本课程介绍了五个功能“基本单元”,使开发者能够将人工智能整合到专业工作流程中。
功能路线图
- 摘要生成:将大量文本(如产品评论)压缩为简洁摘要,同时保留关键信息。
- 推理分析:执行自动化分析,例如情感检测、情绪识别,或从文本中提取特定数据点(如品牌名称)并转换为JSON格式。
- 转换处理:将文本从一种形式转换为另一种形式——包括语言翻译、语气调整(例如正式转为非正式),以及数据格式转换(例如JSON转为HTML)。
- 内容扩展:将简短信号或要点扩展为长篇内容,例如个性化客户服务邮件。
- 聊天机器人:利用对话历史和预定义角色(系统、用户、助手)构建交互式、上下文感知的智能助手。
大型语言模型的无状态特性
关键概念: 与人类不同,大型语言模型是“无状态”的。除非您在每次API调用中手动传回完整的对话历史,否则它们不会记住之前的交互。这种累积的历史被称为 上下文。
TERMINALbash — 80x24
> Ready. Click "Run" to execute.
>
Question 1
A developer needs to extract the "Price" and "Discount Code" from 1,000 emails and save them to a database. Which approach and temperature setting are most appropriate?
Challenge: Tone Transformer
Apply the Transforming and Chatbot role concepts.
You are building a "Tone Transformer" for a corporate helpdesk. You need to convert a frustrated user's slang-heavy complaint into a "Formal" and "Polite" summary for a manager.
Task
Specify the role of the "System" message to ensure the model acts appropriately, and write the "User" prompt to translate: 'The app is buggy as heck and I want my money back ASAP!'
System Message:
User Prompt:
Expected Result:
"You are a professional executive assistant. Your task is to rephrase communication into a formal, corporate-appropriate tone."User Prompt:
"Translate the following text into a formal summary: 'The app is buggy as heck and I want my money back ASAP!'"Expected Result:
"The customer is reporting technical instability within the application and is requesting an immediate refund."